package com.yonyou.cyxdms.sysAuth.service.entity.notification;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;

/**
 * <p>
 * 通知通告之经销商角色
 * </p>
 *
 * @author adu
 * @since 2019-10-14
 */
@TableName("tt_notification_dealer_role")
public class NotificationDealerRolePO extends DMSBasePO<NotificationDealerRolePO> {

	private static final long serialVersionUID = 1L;

	/**
	 * 通知通告之角色ID
	 */
	@TableId(value = "NOTIFICATION_DEALER_ROLE_ID", type = IdType.AUTO)
	private Long notificationDealerRoleId;

	/**
	 * 通知通告ID
	 */
	@TableField("NOTIFICATION_ID")
	private Long notificationId;

	/**
	 * APP_ID
	 */
	@TableField(value = "APP_ID")
	private String appId;

	@TableField("CODE_ID")
	private Long codeId;

	/**
	 * CODE_CN_DESC
	 */
	@TableField("CODE_CN_DESC")
	private String codeCnDesc;

	/**
	 * 是否删除
	 */
	@TableField("IS_DELETED")
	@Version
	@TableLogic
	private Boolean isDeleted;


	public NotificationDealerRolePO() {
		super();
	}


	public Long getNotificationDealerRoleId() {
		return notificationDealerRoleId;
	}

	public void setNotificationDealerRoleId(Long notificationDealerRoleId) {
		this.notificationDealerRoleId = notificationDealerRoleId;
	}

	public Long getNotificationId() {
		return notificationId;
	}

	public void setNotificationId(Long notificationId) {
		this.notificationId = notificationId;
	}

	public Long getCodeId() {
		return codeId;
	}

	public void setCodeId(Long codeId) {
		this.codeId = codeId;
	}

	public String getCodeCnDesc() {
		return codeCnDesc;
	}

	public void setCodeCnDesc(String codeCnDesc) {
		this.codeCnDesc = codeCnDesc;
	}

	public Boolean getDeleted() {
		return isDeleted;
	}

	public void setDeleted(Boolean isDeleted) {
		this.isDeleted = isDeleted;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public String getAppId() {
		return appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

	@Override
	protected Serializable pkVal() {
		return this.notificationDealerRoleId;
	}

	@Override
	public String toString() {
		return "NotificationDealerRolePO{" +
				"notificationDealerRoleId=" + notificationDealerRoleId +
				", notificationId=" + notificationId +
				", appId='" + appId + '\'' +
				", codeId=" + codeId +
				", codeCnDesc='" + codeCnDesc + '\'' +
				", isDeleted=" + isDeleted +
				'}';
	}

	/**
	 * 将PO 信息转化为DTO
	 *
	 * @param dto 需要进行转换的dto
	 * @author chengliang
	 * @since 2019-09-17
	 */
	protected <T extends BaseDTO> void transDtoToPo(T dto) {
		BeanMapperUtil.copyProperties(this, dto, "notificationDealerRoleId");
	}


}
